package com.gict.antifraudback.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gict.antifraudback.entity.ArticleTags;
import com.gict.antifraudback.service.ArticleTagsService;
import com.gict.antifraudback.mapper.ArticleTagsMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author xie
* @description 针对表【article_tags】的数据库操作Service实现
* @createDate 2023-11-03 00:34:07
*/
@Service
public class ArticleTagsServiceImpl extends ServiceImpl<ArticleTagsMapper, ArticleTags>
    implements ArticleTagsService{

    @Override
    public List<ArticleTags> listByArticleId(Integer id) {
        LambdaQueryWrapper<ArticleTags> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(ArticleTags::getArticleId, id);
        return list(wrapper);
    }

    @Override
    public List<ArticleTags> listByArticleIds(List<Integer> ids) {
        LambdaQueryWrapper<ArticleTags> wrapper = Wrappers.lambdaQuery();
        wrapper.in(ArticleTags::getArticleId, ids);
        return list(wrapper);
    }
}




